/**      
 * @file		vectorCopy.cpp
 * @description	Demonstrates the use of vectors. Vectors
 *				can be copied with the assignment operator,=.
 * @course		CSCI 123 Section 00000
 * @assignment 
 * @date		mm/dd/yyyy
 * @author		Brad Rippe (00000000) brippe@fullcoll.edu
 * @version		1.0
 */
#include <iostream>
#include <vector>
using namespace std;

/**
 * @return zero if the application executes successfully
 */
int main() {
	vector <double> doubleVector;

	// fill the vector with doubles
	for(int i = 1; i < 5; i++) {
		doubleVector.push_back(i*i);
	}

	vector <double> doubleVector2;
	// the assignment operator does an element by element copy the 
	// vector on the rhs (right-hand-side) to the lhs (left hand side)
	cout << "The capacity of doubleVector2 is " 
	     << doubleVector2.capacity() << endl;
	doubleVector2 = doubleVector;
	cout << "The capacity of doubleVector2 after the copy is " 
	     << doubleVector2.capacity() << endl;

	// Notice the unsigned int
	// we could also use size_type
	for(unsigned int i = 0; i < doubleVector2.size(); i++) {
		cout << "doubleVector2[" << i << "] = " 
			<< doubleVector2[i] << endl;
	}
	return 0;
}

